	
/****** Object:  Stored Procedure ShippingStatusReportInsert    Script Date: Friday, January 04, 2008 ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[spShippingStatusReportInsert]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [spShippingStatusReportInsert]
GO

	
	

/******************************************************************************
**		File: 
**		Name: spShippingStatusReportInsert
**		Desc: 
**
**		Return values:
** 
**		Called by:   
**              
**		Parameters:
**		Input							Output
**     ----------							-----------
**
**		Auth: CodeSmith
**		Date: 1/4/2008 3:57:05 PM
*******************************************************************************
**		Change History
*******************************************************************************
**		Date:		Author:				Description:
**		--------		--------				-------------------------------------------
**    
*******************************************************************************/
CREATE PROCEDURE spShippingStatusReportInsert
	@REQ int,
	@OrderDate datetime,
	@ContainerSize varchar(50),
	@LP char(1),
	@PONo_Office char(4),
	@PONo_Type char(1),
	@PONo_Supplier varchar(3),
	@PONo_Number int,
	@IsPrimary char(1),
	@PONo_Consolidation int,
	@AccNo varchar(7),
	@CustomerOrLocation nvarchar(30),
	@FinalDestination nvarchar(30),
	@Description nvarchar(50),
	@FactoryETD datetime,
	@ShippingDate datetime,
	@ShippingLine varchar(255),
	@Vessel nvarchar(30),
	@ContainerNo varchar(16),
	@ETA datetime,
	@Week int,
	@ArrivalPort nvarchar(30),
	@PI varchar(12),
	@Payment char(1),
	@DocReceived bit,
	@CompletedDate datetime,
	@BulkType varchar(2),
	@ModifiedDate datetime,
	@BulkOrderNo int,
	@PayAuth char(2),
	@ContainerDeliveried datetime,
	@POInOpera datetime,
	@InvValue money,
	@PayDate datetime,
	@Remarks nvarchar(90),
	@SInvoiced int,
	@SuppOrderNo varchar(6),
	@OfficeID int,
	@CustPONo varchar(12),
	@OnHold bit,
	@BulkOrderOfficeID int,
	@SInvoicedPd datetime,
	@Catalogue nvarchar(9),
	@ShippingLineID int,
	@CatalogID int,
	@PDepValue money,
	@SalesInvoiceValue money,
	@SalesInvoiceDate datetime,
	@SalesPaymentDue datetime,
	@SalesOrder int,
	@TargetETD datetime,
	@IsArchived bit,
	@ResponsibleID int,
	@FactoryETDEnteredDate datetime,
	@ID int output
AS

INSERT INTO [ShippingStatusReport] 
(
	[REQ],
	[OrderDate],
	[ContainerSize],
	[LP],
	[PONo_Office],
	[PONo_Type],
	[PONo_Supplier],
	[PONo_Number],
	[IsPrimary],
	[PONo_Consolidation],
	[AccNo],
	[CustomerOrLocation],
	[FinalDestination],
	[Description],
	[FactoryETD],
	[ShippingDate],
	[ShippingLine],
	[Vessel],
	[ContainerNo],
	[ETA],
	[Week],
	[ArrivalPort],
	[PI],
	[Payment],
	[DocReceived],
	[CompletedDate],
	[BulkType],
	[ModifiedDate],
	[BulkOrderNo],
	[PayAuth],
	[ContainerDeliveried],
	[POInOpera],
	[InvValue],
	[PayDate],
	[Remarks],
	[SInvoiced],
	[SuppOrderNo],
	[OfficeID],
	[CustPONo],
	[OnHold],
	[BulkOrderOfficeID],
	[SInvoicedPd],
	[Catalogue],
	[ShippingLineID],
	[CatalogID],
	[PDepValue],
	[SalesInvoiceValue],
	[SalesInvoiceDate],
	[SalesPaymentDue],
	[SalesOrder],
	[TargetETD],
	[IsArchived],
	[ResponsibleID],
	[FactoryETDEnteredDate]
) 
VALUES 
(
	@REQ,
	@OrderDate,
	@ContainerSize,
	@LP,
	@PONo_Office,
	@PONo_Type,
	@PONo_Supplier,
	@PONo_Number,
	@IsPrimary,
	@PONo_Consolidation,
	@AccNo,
	@CustomerOrLocation,
	@FinalDestination,
	@Description,
	@FactoryETD,
	@ShippingDate,
	@ShippingLine,
	@Vessel,
	@ContainerNo,
	@ETA,
	@Week,
	@ArrivalPort,
	@PI,
	@Payment,
	@DocReceived,
	@CompletedDate,
	@BulkType,
	@ModifiedDate,
	@BulkOrderNo,
	@PayAuth,
	@ContainerDeliveried,
	@POInOpera,
	@InvValue,
	@PayDate,
	@Remarks,
	@SInvoiced,
	@SuppOrderNo,
	@OfficeID,
	@CustPONo,
	@OnHold,
	@BulkOrderOfficeID,
	@SInvoicedPd,
	@Catalogue,
	@ShippingLineID,
	@CatalogID,
	@PDepValue,
	@SalesInvoiceValue,
	@SalesInvoiceDate,
	@SalesPaymentDue,
	@SalesOrder,
	@TargetETD,
	@IsArchived,
	@ResponsibleID,
	@FactoryETDEnteredDate
)

SELECT @ID = @@IDENTITY

GO
	
